The present invention relates generally to a servlet interface, and more specifically for providing a scalable, fault tolerant invocation mechanism between a Webserver and Java Objects.
The Java programming language is an object-oriented programming language. This means that all data and activity in a Java program are organized around the concept of xe2x80x9cclassesxe2x80x9d and xe2x80x9cinterfaces.xe2x80x9d A class contains data and methods that operate on that data. When a class implements an interface, the class defines the methods of the interface. Objects are established by creating instances of classes. Further details of Java, and of object-oriented programs in general, can be found in: xe2x80x9cThe Java Tutorial: Object Oriented Programming for the Internetxe2x80x9d by Mary Campione and Kathy Walrath, which is available in printed form and is also available at http://java.sun.com:80/docs/books/tutorial/-index.html; and xe2x80x9cThe Java Language Specificationxe2x80x9d by James Gosling, Bill Joy, and Guy Steele, which is available in printed form and is also available at http://java.sun.com:80/docs/books/jls/html/index.html. xe2x80x9cJavaxe2x80x9d is a trademark of Sun Microsystems, Inc.
One class that exists in the Java programming languages is the java.lang.Thread class. Threads are independent pieces of logic within a Java application, or servlet. (In this document, the term application is used for both applications and servlets). Each thread executes in a single Java Virtual Machine (JVM). Although, more than one thread can be active at any one time in a virtual machine, a virtual machine generally is resident on one computer.
When a servlet executes, one or more threads run in a single process or rather a single JVM. A conventional Java Environment runs multiple threads of the same servlet or of a plurality of servlets in the same process or single JVM. Since one or more servlet threads run in a single JVM, the execution of the servlet threads occur in the same addressable space.
Running multiple servlets or threads of a servlet in the same addressable space results in a number of problems. For instance, if the execution of a particular thread corrupts the addressable space of the JVM, then the execution of other threads or servlets may also be corrupted. In a best case scenario, the corruption may halt the operation of the other threads or servlets. In a worst case scenario, the corruption may corrupt the data or output of the other threads. Since data corruption may not be readily apparent to the user, the outcome of such an event may result in long term effects that are extremely detrimental.
For example, if an airline reservation system were implemented in Java, data corruption could in theory affect an airline reservation system without notifying the affected users of the resultant errors. Such a scenario is unacceptable under standards set for today""s information systems. However, conventional systems run multiple servlet threads in the same addressable space so that the possibility of such errors occurring currently exists.
The present invention overcomes the problems and disadvantages of the prior art by spreading the execution of objects over multiple JVMs, so that the failure of any one object, such as a servlet thread, will not affect an entire system. Since the processing load is distributed between multiple processes and CPU""s, implementation of the present invention provides for system scalability.
More particularly, the present invention provides a xe2x80x9cservlet server classxe2x80x9d (SSC) that is a distributed, load balanced, fault-tolerant implementation of the servlet interface. The servlet interface includes a unique JVM or instance of the SSC for each servlet thread. Hence, the interface is a system of independent programs where each is executing in its own addressable space. Since the servlet interface distributes work to multiple independent address space isolated processes, a given failure will be confined to a single process. Furthermore, due to the distribution of work, the present invention provides for work load balancing.
Advantages of the invention will be set forth, in part, in the description that follows and, in part, will be understood by those skilled in the art from the description or may be learned by practice of the invention. The advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims and equivalents.